import req from '@/utils/req'

// const MODULE_URL = process.env.BASE_API_process + '/factory/process/';

export function getTreeList() {
  return req.post('/factory/process/list');
}
//新建时获得所有的父名字
export function getProcessNameList() {
  return req.post('/factory/process/processes');
}
//新建
export function createRow(obj) {
  return req.post('/factory/process/create',obj);
}

//修改
export function editRow(obj) {
  return req.post('/factory/process/update',obj);
}

//删除
export function deleteRows(id) {
  return req.post('/factory/process/delete?id='+id)
}

// export function getTreeList() {
//   return req.post(MODULE_URL+'/list');
// }
// //新建时获得所有的父名字
// export function getProcessNameList() {
//   return req.post(MODULE_URL+'/processes');
// }
// //新建
// export function createRow(obj) {
//   return req.post(MODULE_URL+'/create',obj);
// }

// //修改
// export function editRow(obj) {
//   return req.post(MODULE_URL+'/update',obj);
// }

// //删除
// export function deleteRows(id) {
//   return req.post(MODULE_URL+'/delete?id='+id)
// }